#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
    int nowhour = 0, nowminute = 0;
    int k = 0;
    int uphour = 0,upminute = 0;
    scanf("%d:%d %d", &nowhour, &nowminute, &k);
    uphour = (nowhour + (nowminute + k) / 60) % 24;
    upminute = (nowminute + k) % 60;
    if (uphour < 10)
    {
        printf("0%d:", uphour);
    }
    else
    {
        printf("%d:", uphour);
    }
    if (upminute < 10)
    {
        printf("0%d", upminute);
    }
    else
    {
        printf("%d", upminute);
    }
    return 0;
}